<?php

function load_s1_s1 ($product) {
	global $glade,$lang_id, $languages_list;
	loadManufacturersList(array('s1_s1_3_manufacturer'));
	loadSuppliersList(array('s1_s1_4_supplier'));
	loadLanguagesList(array('s1_s1_1_languages_list'));

	$glade->get_widget('s1_s1_1_entry')->set_text($product['name'][$lang_id]);
	$glade->get_widget('s1_s1_2_active_'.intval($product['active']))->set_active(true);
	$glade->get_widget('s1_s1_3_manufacturer')->set_active($product['manufacturer_id']);
	$glade->get_widget('s1_s1_4_supplier')->set_active($product['supplier_id']);
	$glade->get_widget('s1_s1_5_reference')->set_text($product['reference']);
	$glade->get_widget('s1_s1_6_manufacturer_reference')->set_text($product['manufacturer_reference']);
	$glade->get_widget('s1_s1_7_weight')->set_text($product['weight']);
	$glade->get_widget('s1_s1_8_ean13')->set_text($product['ean13']);
	$glade->get_widget('s1_s1_9_position')->set_text($product['position']);
}
